import VisEnumNode from "@/types/VisEnumNode";
import React from "react";
import NodeBox from "../NodeBox";
import { List } from "antd";

export default function EnumNode(props: { enumNode: VisEnumNode }) {
  const { enumNode } = props;
  return (
    <NodeBox
      range={enumNode.range}
      displayName={enumNode.identifier}
      color="#3949AB"
      icon={<span className="iconfont icon-item" />}
    >
      <List
        size="small"
        bordered
        dataSource={enumNode.entries}
        renderItem={(item) => <List.Item>{item}</List.Item>}
      />
    </NodeBox>
  );
}
